currentTimeChanged
Type
message
Summary
Sent to a player when the user switches to another frame.
Syntax
currentTimeChanged <pNewTime>
Description
The currentTimeChanged message is sent while the player is playing or when a user changes the current time in a player.
Handle the currentTimeChanged message if you want to do something when the user changes the current time in a player.
The user can change the current time by:
- clicking the play button in the controller bar,
- clicking in the controller bar,
- dragging the controller bar scroller thumb,
- using the arrow keys when the player is the active (focused) control,
- using the scrubber control in the controller bar. (which is revealed by clicking the arrow buttons in the controller bar while holding the shift key down.)
Changing the player's currenttime property property by script does not trigger the sending of the currentTimeChanged message.
Changing the player's currenttime property property by script does not trigger the sending of the currentTimeChanged message.
Starting the player by script does trigger the sending of the currentTimeChanged message once it is playing.
The number of intervals per second is specified by the player's timeScale property. The total number of intervals is given in the player's duration property.
The actual process of changing the player's current time is not triggered by the currentTimeChanged message, so trapping the message and not allowing it to pass does not prevent the user from changing the player's current time manually.
Parameters
Name | Type | Description |
---|---|---|
pNewTime | The number of the interval where the player is after the change. |
Examples
on currentTimeChanged theInterval -- display the time in a field
put theInterval into field "Time Code"
end currentTimeChanged
Related
control structure: pass
glossary: property, player, message, frame, trap
keyword: player
message: playStarted, playPaused, selectionChanged
object: player
Compatibility and Support
Introduced
LiveCode 1.0
OS
mac
windows
linux
Platforms
desktop
server